package com.daxia.ogmall.common;

import java.util.LinkedHashMap;
import java.util.Map;


public enum HardcoverStyleType {
	ALL(0L, "全部"), 
	JIANYUEBEIOU(16L, "简约北欧"),
	JIANMEIFENGGE(2L, "简美风格"),
	XIANDAIFENGGE(3L, "现代风格"),
	JIANOUFENGGE(4L,"简欧风格"),
	MEISHIFENGGE(24L, "美式风格"), 
	OUSHIFENGGE(20L, "欧式风格"),
	ZUNGUIFASHI(7L, "尊贵法式"),
	DIZHONGHAI(8L, "地中海"),
	HANSHI(9L,"韩式"),
	XINZHONGSHI(14L,"新中式"),
	HUANBAOERTONG(11L,"环保儿童"),
	QITA(5L,"其他");

	private Long value;
	private String remark;

	private HardcoverStyleType(Long value, String remark) {
		this.value = value;
		this.remark = remark;
	}

	public Long getValue() {
		return value;
	}

	public String getRemark() {
		return remark;
	}

	public static HardcoverStyleType getByValue(Long value) {
		for (HardcoverStyleType o : HardcoverStyleType.values()) {
			if (o.getValue() == value) {
				return o;
			}
		}
		return null;
	}
	
	public static Map<Long, String> toMap() {
		LinkedHashMap<Long, String> map = new LinkedHashMap<Long, String>();
		HardcoverStyleType[] hardcoverStyleTypes = HardcoverStyleType.values();
        for (HardcoverStyleType hardcoverStyleType : hardcoverStyleTypes) {
			map.put(hardcoverStyleType.value, hardcoverStyleType.remark);
		}
		
		return map;
	}
	
	public static String getOther() {
		String ret = "";
		HardcoverStyleType[] hardcoverStyleTypes = HardcoverStyleType.values();
        for (HardcoverStyleType hardcoverStyleType : hardcoverStyleTypes) {
        	if (hardcoverStyleType.value.longValue() == HardcoverStyleType.ALL.value || hardcoverStyleType.value.longValue()  == HardcoverStyleType.QITA.value.longValue()) {
        		continue;
        	}
        	ret += hardcoverStyleType.value + ",";
        }
		return ret.substring(0, ret.length() - 1);
	}
}
